package com.ccys.db.entity;

import cn.hutool.core.util.IdUtil;
import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/27
*/
@Data
@ApiModel("问诊医生建议购买的cdmp信息")
@Table(name = "tbl_booking_cdmp_package")
@NoArgsConstructor
@AllArgsConstructor
public class TblBookingCdmpPackage extends BaseEntity {
    @Column(name = "booking_id")
    private String bookingId;

    @Column(name = "member_id")
    private String memberId;

    @Column(name = "cdmp_benefit_id")
    private String cdmpBenefitId;

    @Column(name = "cdmp_pricing_id")
    private String cdmpPricingId;

    @Column(name = "cdmp_benefit_name")
    private String cdmpBenefitName;

    /**
     * 如果组合的价格单位是月，则存储pricing表的价格，如果是年，则除以365存储日单价
     */
    @ApiModelProperty("如果组合的价格单位是月，则存储pricing表的价格，如果是年，则除以365存储日单价")
    private BigDecimal price;

    /**
     * 如果价格单位是月，那么这里存储12，反之存储365
     */
    @ApiModelProperty("如果价格单位是月，那么这里存储12，反之存储365")
    private Integer quantity;

    /**
     * 如果pricing单位是年，则存储pricing表中的价格，如果是月，则乘以12
     */
    @Column(name = "total_amount")
    @ApiModelProperty("如果pricing单位是年，则存储pricing表中的价格，如果是月，则乘以12")
    private BigDecimal totalAmount;

    /**
     * 0 = no select, no payment
     * 1 = mark as selected 'pending'
     * 2 = Update Status Of From Pending To Paid
     */
    private Integer status;

    private Integer show;

    /**
     * 第一次结算时是否被选中
     */
    @ApiModelProperty("第一次结算时是否被选中")
    private Integer selected;

    /**
     * 复购时的booking_id
     */
    @Column(name = "booking_addition_id")
    @ApiModelProperty("复购时的booking_id")
    private String bookingAdditionId;

    /**
     * 是否可复购
     */
    @Column(name = "allow_reactivate")
    @ApiModelProperty("是否可复购")
    private Integer allowReactivate;

    /**
     * 可复购的天数，超出此天数无法复购
     */
    @Column(name = "allow_reactivate_purchase_for")
    @ApiModelProperty("可复购的天数，超出此天数无法复购")
    private Integer allowReactivatePurchaseFor;

    /**
     * 病人第一次支付没有选择当前cdmp的支付时间
     */
    @Column(name = "booking_payment_at")
    @ApiModelProperty("病人第一次支付没有选择当前cdmp的支付时间")
    private Date bookingPaymentAt;

    /**
     * 病人第一次支付选择了CDMP的支付时间
     */
    @Column(name = "purchased_date")
    @ApiModelProperty("病人第一次支付选择了CDMP的支付时间")
    private Date purchasedDate;

    /**
     * 1month 2year
     */
    @Column(name = "price_unit")
    @ApiModelProperty("1month 2year")
    private Integer priceUnit;

    /**
     * Payment frequency(annual)
     */
    @Column(name = "payment_discount")
    @ApiModelProperty("Payment frequency(annual)")
    private BigDecimal paymentDiscount;

    /**
     * todo
     */
    @Column(name = "is_pro_rated")
    @ApiModelProperty("todo")
    private Boolean isProRated;

    /**
     * todo
     */
    @Column(name = "booking_parent_id")
    @ApiModelProperty("todo")
    private String bookingParentId;

    /**
     * 购买时间的一年之后
     */
    @Column(name = "plan_end_date")
    @ApiModelProperty("购买时间的一年之后")
    private Date planEndDate;

}